package com.hdu.careerplan.pojo.entity;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import lombok.Data;

/**
 * 
 * @TableName resume
 */
@TableName(value ="resume", autoResultMap = true)
@Data
public class Resume implements Serializable {
    /**
     * 用户id
     */
    private Long userId;

    /**
     * 文件唯一标识
     */
    private String uuid;

    /**
     * 投递方向
     */
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray directions;

    /**
     * 掌握的技术
     */
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray skills;

    /**
     * 
     */
    private String selfEvaluation;

    /**
     * 实习经历
     */
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray internships;

    /**
     * 项目经历
     */
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray projects;

    /**
     * 竞赛经历
     */
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray competitions;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 逻辑删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Resume other = (Resume) that;
        return (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getUuid() == null ? other.getUuid() == null : this.getUuid().equals(other.getUuid()))
            && (this.getDirections() == null ? other.getDirections() == null : this.getDirections().equals(other.getDirections()))
            && (this.getSkills() == null ? other.getSkills() == null : this.getSkills().equals(other.getSkills()))
            && (this.getSelfEvaluation() == null ? other.getSelfEvaluation() == null : this.getSelfEvaluation().equals(other.getSelfEvaluation()))
            && (this.getInternships() == null ? other.getInternships() == null : this.getInternships().equals(other.getInternships()))
            && (this.getProjects() == null ? other.getProjects() == null : this.getProjects().equals(other.getProjects()))
            && (this.getCompetitions() == null ? other.getCompetitions() == null : this.getCompetitions().equals(other.getCompetitions()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getUuid() == null) ? 0 : getUuid().hashCode());
        result = prime * result + ((getDirections() == null) ? 0 : getDirections().hashCode());
        result = prime * result + ((getSkills() == null) ? 0 : getSkills().hashCode());
        result = prime * result + ((getSelfEvaluation() == null) ? 0 : getSelfEvaluation().hashCode());
        result = prime * result + ((getInternships() == null) ? 0 : getInternships().hashCode());
        result = prime * result + ((getProjects() == null) ? 0 : getProjects().hashCode());
        result = prime * result + ((getCompetitions() == null) ? 0 : getCompetitions().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", userId=").append(userId);
        sb.append(", uuid=").append(uuid);
        sb.append(", directions=").append(directions);
        sb.append(", skills=").append(skills);
        sb.append(", selfEvaluation=").append(selfEvaluation);
        sb.append(", internships=").append(internships);
        sb.append(", projects=").append(projects);
        sb.append(", competitions=").append(competitions);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}